package router

import (
	"github.com/gin-gonic/gin"
	"order_api/api"
	"order_api/middler"
)

func InitRouter() *gin.Engine {
	r := gin.Default()
	//创建订单
	r.POST("create", middler.Check(), api.CreateOrder)

	r.POST("", api.AliPay)
	r.POST("", api.NotifyURL)
	r.POST("", api.ReturnURL)
	return r
}
